package cst.a703xmq.zyfypt_703xmq.Service;

import java.util.List;

import cst.a703xmq.zyfypt_703xmq.Bean.ArticleBean;
import cst.a703xmq.zyfypt_703xmq.Bean.ProjectBean;
import cst.a703xmq.zyfypt_703xmq.Bean.SVideoBean;
import cst.a703xmq.zyfypt_703xmq.Bean.TcaseBean;
import cst.a703xmq.zyfypt_703xmq.Bean.TwareBean;
import cst.a703xmq.zyfypt_703xmq.Bean.LoginBean;
import cst.a703xmq.zyfypt_703xmq.Bean.UserBean;
import cst.a703xmq.zyfypt_703xmq.Bean.VideoBean;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by bboy knowns on 2017/5/10.
 */

public interface ResService {
    @GET("api.php/login")
    Call<LoginBean> login(@Query("username") String username,
                          @Query("password") String password);

   @GET("api.php/reg")
    Call<String> reg(@Query("username") String username,
                     @Query("password") String password,
                     @Query("tel") String tel,
                     @Query("roleid") int roleid,
                     @Query("realname") String realname,
                     @Query("email") String email);

    @GET("api.php/lists")
    Call<List<ArticleBean>>getArticleList(@Query("mod") String mod,
                                          @Query("page") int page,
                                          @Header("SessionID") String sessionID);

    @GET("api.php/lists/mod/{mod}")
    Call<List<TwareBean>>getTwareList(@Path("mod") String mod,
                                      @Query("page") int page,
                                      @Header("SessionID") String SessionID);

    @GET("api.php/lists/mod/{mod}")
    Call<List<VideoBean>>getVideoList(@Path("mod") String mod,
                                      @Query("page") int page,
                                      @Header("SessionID") String sessionID);

    @GET("api.php/listspecial/mod/{mod}")
    Call<List<SVideoBean>>getSVideoList(@Path("mod")String mod,
                                        @Query("page") int page,
                                        @Header("SessionID") String sessionID);

    @GET("api.php/lists")
    Call<List<TcaseBean>>getTcaseList(@Query("mod") String mod,
                                     @Query("page") int page,
                                     @Header("SessionID") String sessionID);

    @GET("api.php/lists")
    Call<List<ProjectBean>>getProjectList(@Query("mod") String mod,
                                          @Query("page") int page,
                                          @Header("SessionID") String sessionID);

}
